package main

import (
	dbc "./dataBase"
	_ "database/sql"
	"fmt"
	_ "fmt"
	_ "github.com/go-sql-driver/mysql"
	_ "reflect"
	_ "strconv"
	_ "testing"
)

func main() {
	Ceshi()
}
func Ceshi() {
	a:=dbc.DropCollection()
	if(a!=nil){
		fmt.Print("删除失败",a)
	}else{fmt.Print("删除成功")}


	//
	//var qindex=mgo.Index{
	//	Key:[]string {"questionsID" },
	//	Unique:true,
	//}
	//var cindex=mgo.Index{
	//	Key:[]string {"checkKnowledgePointID" },
	//	Unique:true,
	//}
	//var uindex=mgo.Index{
	//	Key:[]string {"isRight","syllabusKnowledgePointID","userid" },
	//	Unique:true,
	//	Sparse:true,
	//}
	//
	////err:=dbc.DropIndex("db","Questions"," QuestionsID")
	//err:=dbc.EnsureIndex("db","Questions",qindex)
	//if(err==nil){fmt.Println("Questions表添加索引成功")}else {fmt.Println("Questions表添加索引失败",err)}
	//er2r:=dbc.EnsureIndex("db","Checkknowledgepoint",cindex)
	//if(er2r==nil){fmt.Println("Checkknowledgepoint表添加索引成功")}else {fmt.Println("Checkknowledgepoint表添加索引失败",err)}
	//er3r:=dbc.EnsureIndex("db","Userknowledgepoint",uindex)
	//if(er3r==nil){fmt.Println("Userknowledgepoint表添加索引成功")}else {fmt.Println("Userknowledgepoint表添加索引失败",err)}


}


